package com.kaisu.blog.infrastructure.file;

import jakarta.persistence.Embeddable;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.UpdateTimestamp;

import java.time.LocalDateTime;

/**
 * @author kaisu
 */
@Getter
@Setter
@Entity
@ToString
@DynamicInsert
@DynamicUpdate
@Embeddable
@Table(name = "`file`")
public class FilePO {
    /**
     * 主键
     */
    @Id
    private String id;
    /**
     * 名称
     */
    private String name;
    /**
     * 上传用户
     */
    private String uploadUserId;
    /**
     * 创建时间
     */
    @CreationTimestamp
    private LocalDateTime createTime;
    /**
     * 更新时间
     */
    @UpdateTimestamp
    private LocalDateTime updateTime;
}
